package game.controler.gestionnaires.splashscreen;

import game.impl.splashscreen.*;
import game.model.splashscreen.SplashScreen;
import java.util.HashMap;

/**
 *
 * @author Gab'z
 */
public class GestionnaireSplashScreens {

    private static GestionnaireSplashScreens gSplashScreen = null;
    private HashMap<String, SplashScreen> listeSplashScreen = new HashMap<String, SplashScreen>();

    private GestionnaireSplashScreens() {
        initialiserSplashScreen();
    }

    public static GestionnaireSplashScreens getGsplashScreen() {
        if (gSplashScreen == null) {
            gSplashScreen = new GestionnaireSplashScreens();
        }
        return gSplashScreen;
    }

    public SplashScreen getSplashScreen(String idSplashScreen) {
        return listeSplashScreen.get(idSplashScreen);
    }

    private void ajouterSplashScreen(SplashScreen splashScreen) {
        listeSplashScreen.put(splashScreen.getId(), splashScreen);
    }

    private void initialiserSplashScreen() {
        System.out.println("initialisation SplashScreens");
        ajouterSplashScreen(new fog());
        ajouterSplashScreen(new fog2());
        ajouterSplashScreen(new gardes_peur());
    }
}
